Mon Oct 31, 2016

Recall

Recall from last lecture we studied

  • Random sampling: where we select the sample from the population in an unbiased fashion
  • Bias: A sample is biased if some observational units have a higher probability of being included in the sample.

Keywords: random and probability

Probability

Probability in History

In 79 AD a volcanic eruption in the Roman city of Pompeii covered the entire city in hot ash, perfectly preserving may items:

Drawing

Probability in History

including what I saw at a Pompeii exhibit in Montreal:

Drawing

Two Approaches to Probability

There are two way to approaches to studying probability:

Mathematically (MATH 310) Simulations
Drawing Drawing
  • Note: The "random simulation" in question is not limited to coin flips.

Simulations via Computer

  • The mathematical approach to studying probability requires more mathematical background: set theory, discrete math, calculus, and later on measure theory.
  • The simulation approach does not. Instead we requires a computer's random number generator to generate simulations. Why?

Simulations via Computer

Doing this repeatedly by hand is tiring:

DrawingDrawingDrawingDrawingDrawingDrawingDrawing DrawingDrawingDrawingDrawingDrawingDrawingDrawing DrawingDrawingDrawingDrawingDrawingDrawingDrawing DrawingDrawingDrawingDrawingDrawingDrawingDrawing DrawingDrawingDrawingDrawingDrawingDrawingDrawing DrawingDrawingDrawingDrawingDrawingDrawingDrawing

Analogy for Random Simulation

Analogy for rest of course: POWERBALL

Drawing

  • We can model any random simulation by tinkering with the following attributes of Powerball:

Attributes of Powerball

  • Atrributes of the Lottery Machine:
    • How many balls do you have?
    • What are written on the balls?
    • Do the balls have equal probability of being picked?
  • Attributes of the Drawing:
    • How are you drawing the balls
    • How many balls do you draw?
    • What are you recording about each drawn ball?
    • What do you do with drawn balls?
  • Number of Lotteries:
    • How many times do you repeat the lottery?

Analogy for Random Simulation

## 
## Flipping 1 coin [ Prob(Heads) = 0.5 ] ...
## 
## H
## 
## Number of Heads: 1 [Proportion Heads: 1]
## 
## Flipping 10 coins [ Prob(Heads) = 0.5 ] ...
## 
## T H T T H H H H T T
## 
## Number of Heads: 5 [Proportion Heads: 0.5]
## # A tibble: 10 × 4
##        n heads tails  prop
##    <dbl> <dbl> <dbl> <dbl>
## 1     10     5     5   0.5
## 2     10     7     3   0.7
## 3     10     4     6   0.4
## 4     10     4     6   0.4
## 5     10     7     3   0.7
## 6     10     7     3   0.7
## 7     10     7     3   0.7
## 8     10     3     7   0.3
## 9     10     5     5   0.5
## 10    10     4     6   0.4
## # A tibble: 4 × 2
##   heads count
##   <dbl> <int>
## 1     3     1
## 2     4     3
## 3     5     2
## 4     7     4
##   n heads tails prop
## 1 1     0     1    0
## 2 1     1     0    1
## 3 1     0     1    0
##   V1 V2 V3 V4 V5 V6
## 1  5  6  2  4  3  6
## 2  5  1  6  6  5  6
## 3  5  1  6  6  1  5
##   V1 V2 V3 V4 V5 V6
## 1  6  2  1  3  4  5
## 2  2  4  3  1  5  6
## 3  6  2  1  5  3  4